GXMoveShape
You can use theGXMoveShape
function to move a shape by a specified horizontal and vertical distance.
void GXMoveShape(gxShape target, Fixed deltaX, Fixed deltaY);
target
- A reference to the shape you want to move.
deltaX
- The horizontal distance to move the shape.
deltaY
- The vertical distance to move the shape.
DESCRIPTION
TheGXMoveShape
function changes the position of the shape referenced by thetarget
parameter horizontally by the distance specified in thedeltaX
parameter and vertically by the distance specified in thedeltaY
parameter.This function moves the target shape by the specified offsets in one of two ways:
The target shape can be any shape type. However, if the target shape is an empty shape, a full shape, or a picture shape, this function has no effect unless the shape's
- If the target shape's
gxMapTransformShape
attribute is cleared, the function recalculates the control points of the shape's geometry to effect the move.- If the target shape's
gxMapTransformShape
attribute is set, this function is identical to theGXMoveTransform
function; it recalculates the mapping matrix of the target shape's transform object to effect the move. If the target shape shares this transform object with other shapes, QuickDraw GX makes a copy of the transform object, associates the copy with the target shape, and makes changes to the copy.
gxMapTransformShape
attribute is set. Also, if the shape is a text, glyph, or layout shape and it contains no characters, this function has no effect.The distances are specified in geometry coordinates.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil shape_access_not_allowed (debugging version) Warnings move_shape_out_of_range graphic_type_cannot_be_moved Notices (debugging version) mapping_unaffected SEE ALSO
To move a shape by altering the mapping property of its transform object, you can also use theGXMoveTransform
function, described on page 6-58.